package main

import (
	"blogx_server/core"
	"blogx_server/flags"
	"blogx_server/global"
	"blogx_server/service/qiniu_service"
	"fmt"
)

func main() {
	flags.Parse()
	global.Config = core.ReadConf()
	core.InitLogrus()
	//url, err := qiniu_service.SendFile("uploads/images/70319f64139f906012c30859bbafa050.jpg")
	//fmt.Println(url, err)

	//file, _ := os.Open("uploads/images/70319f64139f906012c30859bbafa050.jpg")
	//url, err := qiniu_service.SendReader(file)
	//fmt.Println(url, err)

	token, err := qiniu_service.GenToken()
	if err != nil {
		return
	}
	fmt.Println(token, err)
}
